<template>
  <div class="result-container">
    <n-card>
      <div class="result-content">
        <n-result
          status="success"
          title="支付成功"
          description="请返回app使用服务。"
        >
          <template #footer>
            <n-button type="primary" @click="goToHome">返回首页</n-button>
          </template>
        </n-result>
      </div>
    </n-card>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

// 跳转到首页
const goToHome = () => {
  router.push('/')
}
</script>

<style scoped>
.result-container {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.result-content {
  text-align: center;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .result-container {
    padding: 10px;
  }
  
  :deep(.n-result-header .n-result-icon) {
    font-size: 48px;
  }
  
  :deep(.n-result-header .n-result-title) {
    font-size: 18px;
  }
  
  :deep(.n-result-header .n-result-description) {
    font-size: 14px;
  }
}
</style>